﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Portal_Tech
{
    [Serializable()]
    public class ParadeFloat
    {
        public static int paradeAverage;

        public List<SubGroup> groups;
        public int numberOfRiders;
        public int floatNumber;

        public ParadeFloat() { groups = new List<SubGroup>(); }

        public bool addSubgroup(SubGroup group)
        {
            int result = this.numberOfRiders + group.numberInGroup;
            if (result < paradeAverage)
            {
                group.FloatPlacement = floatNumber;
                groups.Add(group);
                numberOfRiders = result;
                return true;
            }
            else
                return false;
        }
    }
}
